package root.ontology.eventmembers;

import root.ontology.events.EventConstraint;

import java.util.ArrayList;
import java.util.List;

public class Class extends EventMember {
  public Class() {}

  public List<EventConstraint> definingConstraints = new ArrayList<>();
  // Each time some object is analyzed or broken into pieces - Collection is created based on it.
  public Class(EventConstraint classRequirements) {
  }

  public boolean compatibleWith(Instance instance) {
    for (EventConstraint constraint : definingConstraints) {
      if (!constraint.occuredWith(this)) {
        return false;
      }
    }
    return true;
  }



  // This should be a cache rather than up-to-date list.
  //public List<Instance> members = new ArrayList<>();
}
